Skip to content

ES-2748,ES-2530 - Updated description for eSignet test cases#1623

Merged
zesu22 merged 6 commits intomosip:developfrom
prathmeshj12:develop
Feb 11, 2026
Merged

ES-2748,ES-2530 - Updated description for eSignet test cases#1623
zesu22 merged 6 commits intomosip:developfrom
prathmeshj12:develop

Conversation

@prathmeshj12
Copy link
Contributor

@prathmeshj12 prathmeshj12 commented Jan 31, 2026

  1. Updated the csrf token method before condition.
  2. Updated description for eSignet test cases.
  3. ES-2530 - Added test cases to validate the redirect_uri in token endpoint.

Summary by CodeRabbit

  • Tests

    • Expanded Consent No Capture coverage: added user-info smoke test, negative token scenarios for invalid/empty redirect URI, and associated request/response templates.
    • Clarified multiple test descriptions for OAuth, auth, and token flows.
  • Bug Fixes

    • Streamlined token retrieval in the test runner to fetch once at startup, removing redundant later calls.
  • Chores

    • Updated test cleanup to include partner deletion.

@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

Walkthrough

Consolidates CSRF token fetching to a single early point in the test runner, moves/removes redundant fetches, adds/adjusts DB cleanup queries, introduces a new UserInfo Consent No Capture test with Handlebars templates, and updates several Consent No Capture test descriptions and template paths.

Changes

Cohort / File(s) Summary
CSRF Token Consolidation
api-test/src/main/java/.../testrunner/MosipTestRunner.java
Added a single early call to AdminTestUtil.fetchAndStoreCsrfToken() and removed three later redundant calls.
Database Cleanup Configuration
api-test/src/main/resources/config/pmsDataDeleteQueries.txt
Reordered/added DELETE statements: policy_group moved earlier and a new partner deletion added for the same creator pattern.
Consent No Capture — Descriptions & YAML tweaks
api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/.../*.yml
Updated multiple test case descriptions to be more explicit (AuthCode, Authenticate, GenToken, OAuth, etc.) and adjusted template paths for migrated UserInfo entries.
New UserInfo Test & Templates
api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCapture.yml, .../UserInfoConsentNoCapture.hbs, .../UserInfoConsentNoCaptureResult.hbs
Added a GET /v1/esignet/oidc/userinfo smoke test with input/output Handlebars templates and a result template (empty object).
Negative Token Tests (new)
api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/GenTokenConsentNoCaptureNegTC/...
Added negative token-generation scenarios covering invalid and empty redirect_uri cases with templates and expected invalid_request responses.
TestNG Suite
api-test/testNgXmlFiles/esignetSuite.xml
Added a new TestNG test block for GenerateTokenConsentNoCaptureNegTC and minor formatting adjustments.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • mohanachandran-s
  • zesu22

Poem

🐰 I hopped through code at break of dawn,

Fetched the token once — the repeats are gone.
Templates placed in tidy rows,
Tests bloom where the UserInfo flows.
A carrot-cheer for cleaner runs!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title mentions updating descriptions for eSignet test cases, which aligns with most of the changes (description updates in multiple YAML files), but omits the significant refactoring of CSRF token retrieval and data cleanup query changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/UserinfoConsentNoCapture/UserInfoConsentNoCapture.yml`:
- Around line 10-11: This file duplicates templates in the old
"UserinfoConsentNoCapture" folder; either remove the outdated directory or move
this YAML into the PascalCase "UserInfoConsentNoCapture" directory and update
its inputTemplate/outputTemplate references to use the
"UserInfoConsentNoCapture/UserInfoConsentNoCapture" and
"UserInfoConsentNoCapture/UserInfoConsentNoCaptureResult" paths respectively so
only the PascalCase folder remains and no duplicate configurations exist.

In
`@api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCapture.yml`:
- Around line 1-15: Remove the misnamed duplicate directory
"UserinfoConsentNoCapture" (lowercase i) and its YAML/test files so only the
correctly named "UserInfoConsentNoCapture" remains; ensure the single remaining
test configuration retains the uniqueIdentifier
TC_ESignet_UserInfoConsentNoCapture_01 and continues to reference the
input/output templates at
esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCapture
and ...UserInfoConsentNoCaptureResult to avoid duplicate registration/conflicts
during test discovery.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/GenTokenConsentNoCaptureNegTC/GenTokenConsentNoCaptureNegTC.yml`:
- Line 5: Update the misleading description strings in the
GenTokenConsentNoCaptureNegTC YAML: replace the phrase "Verify successful token
generation … using in invalid redirect uri" (and the similar description at the
other occurrence) with wording that reflects this is a negative test expecting
an invalid_request error and fix the typo "using in invalid" → "using an
invalid"; locate the description fields inside the GenTokenConsentNoCaptureNegTC
test block and change them to something like "Verify token request with an
invalid redirect_uri returns invalid_request error" so the intent and expected
failure are clear.

@prathmeshj12 prathmeshj12 changed the title ES-2748 - Updated description for eSignet test cases ES-2748,ES-2530 - Updated description for eSignet test cases Feb 10, 2026
@zesu22 zesu22 merged commit 0774857 into mosip:develop Feb 11, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants